package com.ldf.jrtsp.enums;

/**
 * rtsp协议类型
 *
 * @author lidaofu
 * @since 2024/6/19
 **/
public enum RtspMediaProtocolType {

    RTP_AVP("RTP/AVP"),
    RTP_AVP_TCP("RTP/AVP/TCP"),
    RTP_SAVP("RTP/SAVP"),

    ;

    private final String value;

    RtspMediaProtocolType(String value) {
        this.value = value;
    }

    public static RtspMediaProtocolType getRespMediaProtocolType(String value) {
        for (RtspMediaProtocolType rtspMediaProtocolType : values()) {
            if (rtspMediaProtocolType.getValue().equals(value)) {
                return rtspMediaProtocolType;
            }
        }
        return RTP_AVP;
    }

    public String getValue() {
        return value;
    }
}
